package com.shiikong_memory.yez.MySQLAPI.Dao;

import com.shiikong_memory.yez.MySQLAPI.JavaBean.AccountDataBean;
import com.shiikong_memory.yez.MySQLAPI.JavaBean.NoticeBean;
import org.apache.ibatis.annotations.*;

import java.util.Date;

public interface AccountDataMapper {
    @Select("select * from accountdata where KookId=#{KookId}")
    AccountDataBean getByKookId(@Param("KookId") String KookId);

    @Insert("insert into accountdata(KookId, status, chars, skins, assistChars, charInfoMap, updateTime)values(#{KookId},#{status},#{chars},#{skins},#{assistChars},#{charInfoMap},#{updateTime})")
    boolean addAccountData(@Param("KookId") String KookId, @Param("status") String status, @Param("chars") String chars, @Param("skins") String skins, @Param("assistChars") String assistChars, @Param("charInfoMap") String charInfoMap, @Param("updateTime") String updateTime);

    @Update("update accountdata set status=#{status},chars=#{chars},skins=#{skins},assistChars=#{assistChars},charInfoMap=#{charInfoMap},updateTime=#{updateTime} where KookId=#{KookId}")
    boolean updateByKookId(@Param("KookId") String KookId, @Param("status") String status, @Param("chars") String chars, @Param("skins") String skins, @Param("assistChars") String assistChars, @Param("charInfoMap") String charInfoMap, @Param("updateTime") String updateTime);

    @Delete("delete from accountdata where KookId=#{KookId}")
    boolean deleteByChatChannelId(@Param("KookId") String KookId);
}
